<?php

class Language_model extends Model
{
	// Protected or private properties
	protected $_table;
	
	// Constructor
	public function __construct()
	{
		parent::Model();
			
		$this->_table = $this->config->item('database_tables');
	}

	// Public methods
	public function get_lang_id($code)
	{
		$this->db->select('*');
		$this->db->where('code', $code);
		$query = $this->db->get($this->_table['language'], 1);
			
		if ($query->num_rows() == 1)
		{
			$row = $query->row_array();
		}
		return $row;
	}
	
}

/* End of file users_model.php */
/* Location: ./application/modules/blog/models/users_model.php */